package com.wyz.note.basics.simple;

/**
 * @Description: 简单手机工厂类
 * @author: wei yz
 * @Date: 2024/1/14 15:34
 */
public class PhoneFactory {
    public static Phone producePhone(String type){
        switch (type){
            case "xiaomi":
                return new XiaomiPhone();
            case "huawei":
                return new HuaweiPhone();
            default:
                return null;
        }
    }
}
